﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleAlgorithms.Utils
{
    public class ListHelper<T>
    {
        public static string ListToString(List<T> list)
        {
            if (list.Count == 0)
                return "[]";

            string[] res = new string[list.Count];
            for (int i = 0; i < list.Count; i++)
            {
                res[i] = list[i] + "";
            }
            return "[" + string.Join(", ", res) + "]";
        }
    }
}
